package com.md.config.client;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Configuration;
import org.springframework.http.client.ClientHttpRequestInterceptor;

import java.util.ArrayList;
import java.util.List;

/**
 * @author 刘骄阳
 * 2023-10-12 15:19
 */
@Data
@ConfigurationProperties("client")
@Configuration
public class ClientConfiguration {
  private static final int DEFAULT_CONNECTION_TIME_OUT = 10000;
  private static final int DEFAULT_READ_TIME_OUT = 10000;
  /**
   * 连接超时时间
   */
  private Integer connectTimeout = DEFAULT_CONNECTION_TIME_OUT;

  /**
   * 请求超时时间
   */
  private Integer readTimeout = DEFAULT_READ_TIME_OUT;
  /**
   * 配置拦截器
   */
  private List<ClientHttpRequestInterceptor> interceptors = new ArrayList<>();


}
